from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution, PythonExpression
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch_ros.actions import Node
from launch_ros.substitutions import FindPackageShare
from launch.conditions import IfCondition, UnlessCondition


def generate_launch_description():
    name: str = 'camera'
    return LaunchDescription([
        Node(
            package='usb_cam', 
            executable='usb_cam_node_exe', 
            output='screen',
            name="camera",
            remappings=[('image_raw', f'{name}/rgb/image_raw'),
                ('image_raw/compressed', f'{name}/rgb/image_compressed'),
                ('image_raw/compressedDepth', f'{name}/rgb/compressedDepth'),
                ('image_raw/theora', f'{name}/rgb/image_raw/theora'),
                ('camera_info', f'{name}/rgb/camera_info'),
            ]
        )
    ])


